<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>事件处理方法</title>
		<script src="https://cdn.jsdelivr.net/npm/vue"></script>
	</head>
	<body>
		<div id="app">
			<button @click="state()">Greet</button>
		</div>
		<script>
			var vm = new Vue({
				el:'#app',
				data:{
					name:'Hello vue'
				},
				methods:{
					state:function(event){
						alert('这是'+this.name+'!');
					}
				}
			})
		</script>
	</body>
</html>
